package com.itheima.Object;

public class Student {
    private String name;
    private Integer age;

    public void setName(String a) {
        name = a;
    }

    public String getName() {
        return name;
    }

    public void setAge(int b) {
        if (b > 0 && b < 100) {
            age = b;
        }
    }

    public int getAge() {
        return age;
    }

    public void study() {
        System.out.println("姓名:" + name + ",年龄:" + age);
    }
}
